package com.ctu.gzero.properties
{
	public class BooleanProperty extends Property
	{
		public function BooleanProperty(name:String, value:Boolean)
		{
			super(name, value);
		}
		
		override public function valueFromString(value:String):Object
		{
			if(value==null)
			{
				return false;
			}
			else 
			{
				return value.toLowerCase() == "true";
			}
		}
		
		override public function hash(obj:Object, code:uint):uint
		{	
			return UintProperty.doHash((obj as Boolean) ? 1 : 0, code);
			
		}
			
	}
}